/**
 * 版权所有(C)，上海海鼎信息工程股份有限公司，2018，所有权利保留。
 * 
 * 项目名：	demo
 * 文件名：	User.java
 * 模块说明：	
 * 修改历史：
 * 2018年2月24日 - wangdanhua - 创建。
 */
package xyz.wangdanhua.demo.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * @author wangdanhua
 *
 */
@Entity
public class User implements Serializable {

  private static final long serialVersionUID = -8965186130850894187L;

  @Id
  @GeneratedValue
  private Long id;

  @Column(nullable = false, unique = true)
  private String userName;

  @Column(nullable = false)
  private String passWord;

  @Column(nullable = false, unique = true)
  private String email;

  @Column(nullable = true, unique = true)
  private String nickName;

  @Column(nullable = false)
  private String regTime;

  public User(String userName, String email, String nickName, String passWord, String regTime) {
    this.nickName = nickName;
    this.email = email;
    this.userName = userName;
    this.passWord = passWord;
    this.regTime = regTime;
  }

  public User() {
    // TODO Auto-generated constructor stub
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getPassWord() {
    return passWord;
  }

  public void setPassWord(String passWord) {
    this.passWord = passWord;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getNickName() {
    return nickName;
  }

  public void setNickName(String nickName) {
    this.nickName = nickName;
  }

  public String getRegTime() {
    return regTime;
  }

  public void setRegTime(String regTime) {
    this.regTime = regTime;
  }

}
